
 export function formatDateTime(date1) {
    const date = new Date(date1);
    const year = date.getFullYear();
    const month = date.getMonth() + 1;
    const day = date.getDate();
    return `${year}-${pad(month)}-${pad(day)} `;
  }
   
  function pad(num) {
    return num.toString().padStart(2, '0');
  }
   
//   const date = new Date();
//   console.log(formatDateTime(date)); 
